package com.czk.servletSpi.impl;

import com.czk.servletSpi.myConfig.WebParameter;
import com.czk.servletSpi.servlet.HerServlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletRegistration;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/4/27 23:28
 */
public class HerWebParameter implements WebParameter {
    @Override
    public void onStartUp(ServletContext servletContext) {
        ServletRegistration.Dynamic herServlet = servletContext.addServlet("herServlet", new HerServlet());
        System.out.println("herServlet被加入了");
        herServlet.setLoadOnStartup(1);
        herServlet.addMapping("/her");
    }
}
